import React from 'react'

function index(cb,time=400){
    let timer=null
  return (...arges)=>{
    if(timer){
        clearTimeout(timer)
    }
    timer=setTimeout(()=>{
        cb.apply(this,arges)
    },time)
  }
}

export default index